import com.edu.pojo.Activitie;
import com.edu.pojo.Department;
import com.edu.service.ActivitieServiceImpl;
import com.edu.service.DepartmentServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DepartmentText {
    @Test
    public void text(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        DepartmentServiceImpl departmentServiceImpl = (DepartmentServiceImpl) context.getBean("departmentServiceImpl");
        for (Department department : departmentServiceImpl.getAllDepartment()) {
            System.out.println(department);
        }
    }
}
